package fr.sinno.wms.batch.mapper;

import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
import org.springframework.validation.BindException;

import fr.sinno.wms.batch.model.LineBonLivraison;

public class LineBonLivraisonFieldSetMapper implements FieldSetMapper<Object>  {

	public Object mapFieldSet(FieldSet rs) throws BindException {

		System.out.println("LineBonLivraisonFieldSetMapper");
		LineBonLivraison lineBL = new LineBonLivraison();

		lineBL.setLineNumber(0);
		lineBL.setCustLineNumber("");
		lineBL.setProductCode("");
		lineBL.setLotCode("");
		lineBL.setQuantity(0.0);
		lineBL.setSerialNO("");
		lineBL.setExpiryDate(null);
		lineBL.setUomCode("");
		lineBL.setSalePrice(0.0);
		lineBL.setQuality("");
		lineBL.setBestBeforeDate(null);
		lineBL.setMinShelfLife(0.0);
		lineBL.setServedQuantity(0.0);
		lineBL.setWeight(0.0);
		lineBL.setDate(null);
		lineBL.setQttyOrdered(0.0);
		lineBL.setQttyShipped(0.0);
		lineBL.setQttySubstituted(0.0);
		lineBL.setQttyDamaged(0.0);
		lineBL.setQttyRefused(0.0);
		lineBL.setQttyAllocByHost(0.0);
		lineBL.setNumDetails(0);
		lineBL.setNumLot(0);

		return lineBL;
	}

}
